# Source global definitions
if [ -f /etc/bashrc ]; then
  . /etc/bashrc
fi

HISTCONTROL=ignoreboth

shopt -s histappend
HISTSIZE=1000
HISTFILESIZE=2000
shopt -s checkwinsize

################  git branch name  ###################
function git_branch {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return;
  echo "("${ref#refs/heads/}") ";
}

PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\e[1;36m\]\$(git_branch)\[\033[00m\]\$ "


########### git ##########################
if [ -f ~korben/myLinuxEnv/git/git-completion.bash ]; then
  source ~korben/myLinuxEnv/git/git-completion.bash
fi

######################################

# colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

##########################################
if [ -f ~/.bashrc_local ]; then
  source ~/.bashrc_local
fi

if [ -f ~korben/myLinuxEnv/bash/bashrc_aliases ]; then
  source ~korben/myLinuxEnv/bash/bashrc_aliases
fi

if [ -f ~korben/myLinuxEnv/bash/bashrc_modules ]; then
  source ~korben/myLinuxEnv/bash/bashrc_modules
fi

###  powerline
# export TERM="screen-256color"

export MAKEFLAGS="$MAKEFLAGS -j128" # Assuming you have N cores on your host system

